package com.cloud.socketTest;

import java.io.OutputStream;
import java.net.Socket;
import java.nio.charset.StandardCharsets;

public class ClientSocket {
    public static void main(String[] args) throws Exception{
        Socket socket = new Socket("localhost", 8081);
        OutputStream outputStream = socket.getOutputStream();
        int i = 1;
        while (true) {
            System.out.println(i++);
            outputStream.write("123".getBytes(StandardCharsets.UTF_8));
        }

    }
}
